package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("admin_role")
@AllArgsConstructor
@NoArgsConstructor
public class AdminRole implements Serializable {

    private static final long serialVersionUID = 1L;

    public AdminRole(String roleName, Integer roleLevel) {
        this.roleName = roleName;
        this.roleLevel = roleLevel;
    }

    /**
     * 角色表主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 角色名称
     */
    @TableField("role_name")
    private String roleName;

    /**
     * 角色等级(越小越大)
     */
    @TableField("role_level")
    private Integer roleLevel;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
